package com.lwb.eduservice.client;

import com.lwb.commonutils.Row;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    //定义要调用方法的路径
    //根据视频ID删除视频
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")
    public Row removeAlyVideo(@PathVariable("id") String id);

    //删除多个阿里云视频的方法
    //参数多个视频id  List videoIdList
    @DeleteMapping("/eduvod/video/delete-batch")
    public Row deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);
}
